package com.springboot.demo.design.pattern.decorator;

/**
 * 菜品装饰者,持有装饰者组件对象，所有的具体装饰者必须实现这个类中定义的接口
 *
 * @author supu
 * @date 2019-07-08 15:59
 **/
public abstract class GreensDecorator extends DecoratorComponent {
    protected DecoratorComponent decoratorComponent;

    public GreensDecorator(DecoratorComponent decoratorComponent) {
        this.decoratorComponent = decoratorComponent;
    }

    @Override
    public void addGreens() {
        decoratorComponent.addGreens();
    }
}
